package com.ruiyian.bridge.info.controller;

import com.ruiyian.bridge.info.domain.DialyReport;
import com.ruiyian.bridge.info.service.DialyReportService;
import com.ruiyian.common.core.controller.BaseController;
import com.ruiyian.common.core.domain.AjaxResult;
import com.ruiyian.common.core.page.TableDataInfo;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author chong
 * @email 673426164@qq.com
 * @create 2022/6/17
 * Desc: 监测日报
 */
@RestController
@RequestMapping("/bridge/info/report")
public class DialyReportController extends BaseController {
    @Autowired
    private DialyReportService dialyReportService;
    /**
     * 查询桥梁基本信息列表
     */
    @GetMapping("/list")
    public TableDataInfo list(DialyReport dialyReport)
    {
        startPage();
        List<DialyReport> list = dialyReportService.list(dialyReport);
        return getDataTable(list);
    }

    /**
     * 删除
     * @param ids
     * @return
     */
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(dialyReportService.deleteByIds(ids));
    }
}
